<template>
  <div class="likeWrap">
    <img :src="likeImg" alt="" />
    <span @click="add"> {{msg}} ({{num}})</span>
  </div>
</template>

<script>
import likeImg from "@/assets/like.png";
export default {
  data() {
    return {
      likeImg,
      num:999,
      msg:'点赞'
    };
  },
  methods:{
    add(){
      this.num++
      this.msg = "已赞"
    }
  }
};
</script>

<style lang="scss" scoped>
.likeWrap {
  img {
    width: 18px;
    vertical-align: text-top;
  }
  span{
    cursor: pointer;

  }
}
</style>